use Modern::Perl;
use Net::OpenSSH;
use Data::Dumper;
use Test::More;

my $err;
my $getline;


my $host = "gitlab-ci-test:123456\@192.168.4.13:2200";
my $ssh = Net::OpenSSH->new(
  $host,
  master_opts => [-o => "StrictHostKeyChecking=no"],
  connect => 0 ,
);
note $ssh->error;
note $ssh->check_master;
note $ssh->error;
#note $ssh->get_user;
#note $ssh->get_ctl_path;
#note $ssh->capture('ls ~/test');
#note $ssh->error;
#=pod
my ($output,  $errput) = $ssh->capture2('ls /flowcell_interface');# 用这种方法可以获得命令的结果和错误!!
#note $output;
my @result = split "\n", $output;
note $result[0];
#note $errput;
#=cut
#$ssh->system({stdout_fh => $write_err_fh,stderr_to_stdout=>1},"ls /");
#$getline = <$read_err_fh>;
#note $getline;
#my $result = $ssh->system({stdout_fh=>$write_err_fh,stderr_to_stdout => 1},"ls ~/test");
#$getline = <$read_err_fh>;
#note $getline;
# 如何获得链接信息??



